#encoding:utf-8
import os
basedir = os.path.abspath(os.path.dirname(__file__))


class Config:
    SECRET_KEY = 'iamlqw'
    #邮箱配置
    MAIL_SERVER = 'smtp.qq.com'  #邮箱服务
    MAIL_PORT = 587
    MAIL_USE_TLS = True
    MAIL_USERNAME = '821062763@qq.com'
    MAIL_PASSWORD = 'jmbgnoyfyoijbfdf'

    #数据库配置
    SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:@127.0.0.1/forest_resources'
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
    SQLALCHEMY_TRACK_MODIFICATIONS = False

    @staticmethod
    def init_app(app):
        pass

class DevelopmentConfig(Config):
    DEBUG = True


class TestingConfig(Config):
    TESTING = True


class ProductionConfig(Config):
    pass


config = {
    'development': DevelopmentConfig,
    'testing': TestingConfig,
    'production': ProductionConfig,

    'default': DevelopmentConfig
}
